package com.bindapp.activity;

import android.databinding.DataBindingUtil;
import android.view.LayoutInflater;
import android.webkit.WebChromeClient;
import android.webkit.WebViewClient;

import com.bindapp.R;
import com.bindapp.databinding.ActivityWebBinding;

/**
 * Created by apple on 2018/7/22.
 */

public class WebActivity extends BaseActivity {
    private ActivityWebBinding binding;

    @Override
    protected void after() {
        super.after();
        binding= DataBindingUtil.inflate(LayoutInflater.from(this), R.layout.activity_web,null,false);
        binding.webview.getSettings().setJavaScriptEnabled(true);
        binding.webview.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
        binding.webview.getSettings().setSupportMultipleWindows(true);
        binding.webview.setWebViewClient(new WebViewClient());
        binding.webview.setWebChromeClient(new WebChromeClient());
        binding.webview.loadUrl(getIntent().getStringExtra("url"));
        handerBackToolar(getIntent().getStringExtra("title"));
        AddContentView(binding.getRoot());
    }
}
